package com.yixing.tech.common.hikservice.rcs;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
public class RCSTaskRequest implements Serializable {

    /** common attribute */
    protected String reqCode;
    protected String reqTime;   /** format: yyyy-MM-dd HH:mm:ss */
    protected String clientCode;
    protected String tokenCode;
    protected String interfaceName; /** genAgvSchedulingTask */
    protected String wbCode;
    protected String podCode;
    protected String taskCode;
    protected String agvCode;
    protected String podDir;
    protected String groupId;

    /** genAgvTask attribute */
    protected String taskTyp;
    protected String sceneTyp;
    protected String ctnrTyp;
    protected String ctnrCode;
    protected Object[] positionCodePath;
    protected String podTyp;
    protected String priority;
    protected String data;

    /** continueAgvTask attribute */
    protected String taskSeq;
    protected Object nextPositionCode;

    /** cancelAgvTask attribute */
    protected String forceCancel;
    protected String matterArea;

    /** bindPodAndBirth attribute */
    protected String positionCode;
    protected String indBind;

    /** preScheduleTask */
    protected String nextTask;      /** 预调度时间，表示真实任务预计多久后生成，-1清空点位预调度任务 */
    protected String agvTyp;        /** AGV类型: */
    protected String clearPreTask;  /** 0不清空之前的预调度任务 1清空之前的预调度任务 默认为0 */

    /** stopRobot resumeRobot attribute */
    protected String robotCount;
    protected String mapShortName;
    protected String[] robots;

    /** RCS3.3 料箱取放回调 */
    private String type;      /** 1申请通过 2放申请通过 */

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static final class PositionCodeObj {
        private String positionCode;
        private String type;
    }

    public RCSTaskRequest() {
    }

    public RCSTaskRequest(String reqCode, String reqTime, String clientCode, String tokenCode, String interfaceName, String wbCode, String podCode, String taskCode, String agvCode, String podDir, String groupId, String taskTyp, String sceneTyp, String ctnrTyp, String ctnrCode, Object[] positionCodePath, String podTyp, String priority, String data, String taskSeq, Object nextPositionCode, String forceCancel, String matterArea, String positionCode, String indBind, String nextTask, String agvTyp, String clearPreTask, String robotCount, String mapShortName, String[] robots, String type) {
        this.reqCode = reqCode;
        this.reqTime = reqTime;
        this.clientCode = clientCode;
        this.tokenCode = tokenCode;
        this.interfaceName = interfaceName;
        this.wbCode = wbCode;
        this.podCode = podCode;
        this.taskCode = taskCode;
        this.agvCode = agvCode;
        this.podDir = podDir;
        this.groupId = groupId;
        this.taskTyp = taskTyp;
        this.sceneTyp = sceneTyp;
        this.ctnrTyp = ctnrTyp;
        this.ctnrCode = ctnrCode;
        this.positionCodePath = positionCodePath;
        this.podTyp = podTyp;
        this.priority = priority;
        this.data = data;
        this.taskSeq = taskSeq;
        this.nextPositionCode = nextPositionCode;
        this.forceCancel = forceCancel;
        this.matterArea = matterArea;
        this.positionCode = positionCode;
        this.indBind = indBind;
        this.nextTask = nextTask;
        this.agvTyp = agvTyp;
        this.clearPreTask = clearPreTask;
        this.robotCount = robotCount;
        this.mapShortName = mapShortName;
        this.robots = robots;
        this.type = type;
    }
}
